﻿using HCQ2_Model.ParamsModel;
using HCQ2_Model.ViewModel;
using HCQ2_Model.ViewModel.VR;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HCQ2_IDAL
{
    /// <summary>
    /// 订单相关
    /// </summary>
    public partial interface IT_VROrderDAL
    {

        /// <summary>
        /// 获取一个订单编号
        /// </summary>
        /// <returns></returns>
        string GetOrderCode();

        /// <summary>
        /// 获取订单列表
        /// </summary>
        /// <param name="orderListParams"></param>
        /// <returns></returns>
        TableModel GetOrderList(OrderListParams orderListParams);

        /// <summary>
        /// 获取订单详细
        /// </summary>
        /// <param name="orderCode">订单编号</param>
        /// <returns></returns>
        OrderDetailed GetOrderDetailed(string orderCode);
        /// <summary>
        ///  判断用户是否购买商品
        /// </summary>
        /// <param name="fileId"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        int GetShoppingFile(int fileId,int userId);
        //********************************************接口************************************************
        /// <summary>
        ///  判断当前文件是否是被用户购买
        /// </summary>
        /// <param name="user_id">用户id</param>
        /// <param name="file_id">文件id</param>
        /// <returns></returns>
        int GetOrderResult(int user_id, int file_id);
        /// <summary>
        ///  更新商品购买订单状态为：成功
        /// </summary>
        /// <param name="user_id"></param>
        /// <param name="file_id"></param>
        /// <returns></returns>
        void ModifyOrderStatus(int user_id, int file_id);
    }
}
